<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <style>
        body {
            width: 400px;
            height: 500px;
            padding: 20px;
            font-family: Arial, sans-serif;
        }
        
        .header {
            text-align: center;
            margin-bottom: 20px;
        }
        
        .title {
            font-size: 18px;
            font-weight: bold;
            color: #333;
        }
        
        .buttons {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        button {
            flex: 1;
            padding: 10px;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            font-size: 14px;
        }
        
        .extract-btn {
            background-color: #4CAF50;
            color: white;
        }
        
        .extract-btn:hover {
            background-color: #45a049;
        }
        
        .copy-btn {
            background-color: #2196F3;
            color: white;
        }
        
        .copy-btn:hover {
            background-color: #1976D2;
        }
        
        .clear-btn {
            background-color: #f44336;
            color: white;
        }
        
        .clear-btn:hover {
            background-color: #da190b;
        }
        
        .content-area {
            border: 1px solid #ddd;
            border-radius: 5px;
            padding: 10px;
            height: 350px;
            overflow-y: auto;
            background-color: #f9f9f9;
        }
        
        .content-text {
            font-size: 12px;
            line-height: 1.5;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        
        .status {
            margin-top: 10px;
            padding: 5px;
            text-align: center;
            font-size: 12px;
            border-radius: 3px;
        }
        
        .status.success {
            background-color: #d4edda;
            color: #155724;
        }
        
        .status.error {
            background-color: #f8d7da;
            color: #721c24;
        }
        
        .char-count {
            font-size: 11px;
            color: #666;
            text-align: right;
            margin-top: 5px;
        }
    </style>
</head>

<body>
    <div class="header">
        <div class="title">页面内容提取器</div>
    </div>

    <div class="buttons">
        <button id="extractBtn" class="extract-btn">获取内容</button>
        <button id="copyBtn" class="copy-btn">复制</button>
        <button id="clearBtn" class="clear-btn">清空</button>
    </div>

    <div class="content-area">
        <div id="contentText" class="content-text">点击"获取内容"按钮来提取当前页面的文本内容</div>
    </div>

    <div class="char-count" id="charCount">字符数：0</div>

    <div id="status" class="status" style="display: none;"></div>

    <script src="popup.js"></script>
</body>

</html>